﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Autos.aspx.vb" Inherits="Autos" aspcompat=true%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head" runat="server">

    <title>Página sin título</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        Acceso a tabla por :
        <asp:Label ID="lblUser" runat="server" Text="Label"></asp:Label><br />
    <a href="Inicio.aspx">Volver a Pagina de Inicio</a><br />
        &nbsp;<asp:Button ID="btnAgregar" runat="server" Text="Agregar" Width="80px" />
        <asp:Button ID="btnEliminar" runat="server" Text="Eliminar" Width="80px" />
        <asp:Button ID="btnEditar" runat="server" Text="Editar" Width="80px" />
        <asp:Button ID="btnFiltrar" runat="server" Text="Filtrar" Width="80px" />
        <asp:Button ID="Button2" runat="server" Text="Calculadora Windows" /><br />
        <asp:Panel ID="PanelSeleccion" runat="server" BorderStyle="Double" Height="50px" Visible="False"
            Width="504px">
            Seleccione el registro por
        Patente :&nbsp;
        <asp:DropDownList ID="DDLPatentes" runat="server" DataSourceID="AccessDataAutos"
            DataTextField="Patente" DataValueField="Patente" AppendDataBoundItems="True" AutoPostBack="True" Width="112px">
            <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
        </asp:DropDownList>&nbsp;&nbsp; &nbsp; 
            <asp:Label ID="lblCrtlDDLPatentes" runat="server" ForeColor="Red" Text="*Seleccione una patente"
                Visible="False" Width="150px"></asp:Label>
            &nbsp; &nbsp;&nbsp; &nbsp;<br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
            <asp:Button ID="btnSalirPanelEdicion" runat="server" Text="Salir" Width="80px" BackColor="#C00000" /></asp:Panel>
        <asp:Panel ID="PanelFiltro" runat="server" BorderStyle="Double" Height="168px" Width="504px" Visible="False">
            <asp:Label ID="Label1" runat="server" Text="Campos de datos" Width="136px"></asp:Label>
            <asp:DropDownList ID="DDLCampos" runat="server" AppendDataBoundItems="True" AutoPostBack="True" Width="136px">
                <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
            </asp:DropDownList>&nbsp;
            <asp:Label ID="lblCampo" runat="server" ForeColor="Red" Text="*Seleccione un campo de datos"
                Visible="False" Width="200px"></asp:Label><br />
            <asp:Label ID="Label2" runat="server" Text="Operadores lógicos" Width="136px"></asp:Label>
            <asp:DropDownList ID="DDLLogicos" runat="server" AutoPostBack="True" Width="136px">
                <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
                <asp:ListItem>=</asp:ListItem>
                <asp:ListItem>&gt;</asp:ListItem>
                <asp:ListItem>&lt;</asp:ListItem>
                <asp:ListItem>&gt;=</asp:ListItem>
                <asp:ListItem>&lt;=</asp:ListItem>
                <asp:ListItem>&lt;&gt;</asp:ListItem>
                <asp:ListItem>or</asp:ListItem>
                <asp:ListItem>and</asp:ListItem>
                <asp:ListItem>in</asp:ListItem>
                <asp:ListItem>between</asp:ListItem>
            </asp:DropDownList>&nbsp;
            <asp:Label ID="lblLogico" runat="server" ForeColor="Red" Text="*Seleccione un operador lógico"
                Visible="False" Width="200px"></asp:Label><br />
            <asp:Label ID="Label3" runat="server" Text="Datos del campo" Width="136px"></asp:Label>
            <asp:DropDownList ID="DDLDatos" runat="server" AppendDataBoundItems="True" AutoPostBack="True" Width="136px">
                <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
        </asp:DropDownList>&nbsp;&nbsp;<asp:Label ID="lblDato" runat="server" ForeColor="Red"
                Text="*Seleccione un dato del campo" Visible="False" Width="200px"></asp:Label><br />
            &nbsp;<br />
            SQL =
            <asp:TextBox ID="txtSQL" runat="server" Height="32px" TextMode="MultiLine" Width="448px"></asp:TextBox><br />
            <br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:Button ID="btnLimpiarSQL" runat="server" Text="Limpiar SQL" Width="80px" /><asp:Button ID="btnAceptarFiltro" runat="server" Text="Aceptar" Width="80px" BackColor="Green" /><asp:Button ID="btnSalirPanelFiltro" runat="server" Text="Salir" Width="80px" BackColor="#C00000" />
        </asp:Panel><asp:Panel ID="PanelEliminar" runat="server" BorderStyle="Double" Height="24px" Visible="False"
            Width="504px">
            Seleccione el registro por Patente :&nbsp;&nbsp;<asp:DropDownList ID="DDLPatenteEliminar" runat="server" DataSourceID="AccessDataAutos"
            DataTextField="Patente" DataValueField="Patente" AppendDataBoundItems="True" AutoPostBack="True" Width="112px">
                <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
            </asp:DropDownList>
            &nbsp; &nbsp;<asp:Label ID="lblCrtlDDLPatenteEliminar" runat="server"
                ForeColor="Red" Text="*Seleccione una patente" Visible="False" Width="150px"></asp:Label><br />
            <br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:Button ID="btnAceptarPanelEliminar" runat="server" Text="Eliminar" Width="80px" BackColor="Green" /><asp:Button ID="btnSalirPanelEliminar" runat="server" Text="Salir" Width="80px" BackColor="#C00000" /></asp:Panel>
        <br />
        <asp:Panel ID="PanelEdicion" runat="server" Height="240px" Width="392px" BackColor="#E0E0E0" BorderStyle="Outset" Visible="False">
            &nbsp;<asp:Label ID="lblPatente" runat="server" Text="Patente " Width="65px"></asp:Label>&nbsp;
            <asp:TextBox ID="txtPatente" runat="server" Width="150px"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtPatente"
                ErrorMessage="Formato inválido" ValidationExpression="([a-zA-Z][a-zA-Z][a-zA-Z]\d{3})"></asp:RegularExpressionValidator><br />
            &nbsp;<asp:Label ID="lblMarca" runat="server" Text="Marca " Width="65px"></asp:Label>&nbsp;
            <asp:TextBox ID="txtMarca" runat="server" Width="150px" BackColor="Silver" ReadOnly="True" ToolTip="Marca no editable. Seleccione desde la lista ->"></asp:TextBox>&nbsp;<asp:DropDownList ID="DDLMarcas" runat="server" DataSourceID="AccessDataMarcas"
            DataTextField="Marca" DataValueField="Marca" AutoPostBack="True" Width="112px" AppendDataBoundItems="True">
                <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
        </asp:DropDownList><br />
            &nbsp;<asp:Label ID="lblModelo" runat="server" Text="Modelo" Width="65px"></asp:Label>&nbsp;
            <asp:TextBox ID="txtModelo" runat="server" Width="150px" BackColor="Silver" ReadOnly="True" ToolTip="Modelo no editable. Seleccione desde la lista ->"></asp:TextBox>&nbsp;<asp:DropDownList ID="DDLModelos" runat="server"
            DataTextField="Modelo" AutoPostBack="True" Width="112px" AppendDataBoundItems="True">
                <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
            </asp:DropDownList><br />
            &nbsp;<asp:Label ID="lblTitular" runat="server" Text="Titular" Width="65px"></asp:Label>&nbsp;
            <asp:TextBox ID="txtTitular" runat="server" Width="150px" BackColor="Silver" ReadOnly="True" ToolTip="Titular no editable. Seleccione desde la lista ->"></asp:TextBox>&nbsp;<asp:DropDownList ID="DDLTitulares" runat="server"
            DataTextField="Titular" DataSourceID="AccessDataTitulares" DataValueField="Titular" Width="150px" AutoPostBack="True" AppendDataBoundItems="True">
                <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
            </asp:DropDownList><br />
            &nbsp;<asp:Label ID="lblAño" runat="server" Text="Año" Width="65px"></asp:Label>&nbsp;
            <asp:TextBox ID="txtAño" runat="server" Width="50px" BackColor="Silver" ReadOnly="True" ToolTip="Año no editable. Seleccione desde la lista ->"></asp:TextBox>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
            <asp:DropDownList ID="DDLAños" runat="server" AutoPostBack="True" Width="112px" AppendDataBoundItems="True">
                <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
            </asp:DropDownList><br />
            &nbsp;<asp:Label ID="Label4" runat="server" Text="Comisaria" Width="65px"></asp:Label>
            &nbsp;<asp:TextBox ID="txtComisaria" runat="server" BackColor="Silver" ReadOnly="True"
                ToolTip="Marca no editable. Seleccione desde la lista ->" Width="150px"></asp:TextBox>&nbsp;<asp:DropDownList ID="DDLComisarias" runat="server" DataSourceID="AccessDataComisarias"
            DataTextField="Comisaria" DataValueField="Comisaria" AutoPostBack="True" Width="112px" AppendDataBoundItems="True">
                    <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
                </asp:DropDownList><br />
            &nbsp;<asp:Label ID="Label5" runat="server" Text="Estado" Width="65px"></asp:Label>&nbsp;
            <asp:TextBox ID="txtEstado" runat="server" BackColor="Silver" ReadOnly="True" ToolTip="Marca no editable. Seleccione desde la lista ->"
                Width="150px"></asp:TextBox>&nbsp;<asp:DropDownList ID="DDLEstados" runat="server" DataSourceID="AccessDataEstados"
            DataTextField="Estado" DataValueField="Estado" AutoPostBack="True" Width="150px" AppendDataBoundItems="True">
                    <asp:ListItem>Su Elecci&#243;n</asp:ListItem>
                </asp:DropDownList><br />
            <center>
                &nbsp;</center>
            <center>
            <asp:Button ID="btnAceptarEdicion" runat="server" Text="Aceptar Cambios" Width="120px" ToolTip="Modifica el registro" />
            <asp:Button ID="btnSalir" runat="server" Text="Salir" Width="120px" ToolTip="Sale sin guardar los cambios" />
                <asp:Button ID="btnRecuperar" runat="server" Text="Restaurar" Width="120px" ToolTip="Restaura valores iniciales para editar" /></center>
            <center>
                &nbsp;</center>
            </asp:Panel>
        <br />
        &nbsp; &nbsp;<br />
        &nbsp;&nbsp;
        <br />
        &nbsp; &nbsp;
        <br />
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp; &nbsp;
        <br />
        <br />
        <asp:GridView ID="GV2" runat="server" Caption="MiTabla">
        </asp:GridView>
        &nbsp;&nbsp;<br />
        <asp:AccessDataSource ID="AccessDataAutos" runat="server" DataFile="~/Sira.mdb"
            SelectCommand="SELECT Patente, Marca, Año, Modelo, Titular FROM Autos ORDER BY Patente"></asp:AccessDataSource>
        <asp:AccessDataSource ID="AccessDataMarcas" runat="server" DataFile="~/Sira.mdb"
            SelectCommand="SELECT [Marca] FROM [Marcas] ORDER BY [Marca]"></asp:AccessDataSource>
        <asp:AccessDataSource ID="AccessDataTitulares" runat="server" DataFile="~/Sira.mdb"
            SelectCommand="SELECT Titular FROM Titulares ORDER BY Titular"></asp:AccessDataSource><asp:AccessDataSource ID="AccessDataComisarias" runat="server" DataFile="~/Sira.mdb"
            SelectCommand="SELECT [Comisaria] FROM [Comisarias] ORDER BY [Comisaria]"></asp:AccessDataSource>
        <asp:AccessDataSource ID="AccessDataEstados" runat="server" DataFile="~/Sira.mdb"
            SelectCommand="SELECT [Estado] FROM [Estados] ORDER BY [Estado]"></asp:AccessDataSource>
        <br />
        <br />
    </div>
    </form>
</body>
</html>
